<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 </head>
 <body>
  
 </body>
 <script>
     var array_1 = new Array();
	 var array_2 = new Array(10);
	 array_2[0] = 1;
	 var array_3 = new Array(1,2,3,4,5);
      
     console.log("array_1.length = "+array_1.length);
	 console.log("array_2.length = "+array_2.length);
	 console.log("array_3.length = "+array_3.length);

	 console.log("array_2 = "+array_2);
	 console.log("array_3 = "+array_3);

	 for(var i=0;i<array_3.length;i++){
	   console.log(array_3[i]);
	 }
	 //join("") 将一个数组转换成一个字符串,并且用指定的符号进行分割
	 var str_1 = array_3.join("");
	 console.log("str_1 = "+str_1);

    //push() 在一个数组中添加元素
	array_3.push(6,7,8,9,10);
	console.log("array_3 = "+array_3);

	//toString() 将数组转换成一个字符串
	var str_2 = array_3.toString();
	console.log("str_2 = "+str_2);
    
	//pop()删除并返回数组最后的一个元素
	var str_3 = array_3.pop();
	console.log("str_3 = "+str_3);
 </script>
</html>
